package cn.com.nes.site.entity.em.project;

import java.util.HashMap;
import java.util.Map;

public enum ProjectServiceUserTypeEnum {

    CONSTRUCTION_PERSONNEL(0, "施工人员"),
    CONSTRUCTION_MANAGER(1, "施工负责人"),
    ;

    private final Integer key;
    private final String value;

    ProjectServiceUserTypeEnum(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getVal(int key) {
        Map<Integer, String> map = new HashMap<>();
        for (ProjectServiceUserTypeEnum value : values()) {
            map.put(value.getKey(), value.getValue());
        }
        return map.get(key);
    }
}
